<?php

class Core_Model_Global_Collection_Area extends Dcmp_Model_Collection_Strong {

    public function __construct() {
        parent::__construct();
        $this->setItemClass('global/area');
        $this->from('{t}global_area', 'a')->field('a.*');
    }

    public function filterBy($name, $arg) {
        switch ($name) {
            case 'id':
                $this->addParameter('id', $arg)->eq('a.id', ':id:s');
                break;
        }
        return parent::filterBy($name, $arg);
    }
}

